package com.chinatelecom.otms;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TempCountdownLatchRun {
    public static void main(String[] args) throws InterruptedException {
        CountDownLatch countDownLatch = new CountDownLatch(10);
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for(int i = 0; i < 10; i ++){
            executorService.execute(new TempRunnable(countDownLatch));
        }
        countDownLatch.await();
        System.out.println("main thread is finished......");
    }
}
